-
Notifications
You must be signed in to change notification settings - Fork 31
WIP: chore(root): new docs docusaurus + swagger ui #331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
aminlotfi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your efforts @alirezakazemeini ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest having someone from the SRE team review this workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.idea/vcs.xml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove all .idea files and add them to .gitignore as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
node_modules/.yarn-integrity
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove it.
| ], | ||
| ], | ||
|
|
||
| themeConfig: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SepidehM mentioned we don’t need all those language tabs and prefer having just 3–4. You can control this via themeConfig, for example:
languageTabs: [
{
highlight: "python",
language: "python",
logoClass: "python",
},
{
highlight: "javascript",
language: "nodejs",
logoClass: "nodejs",
},
],Please double-check with @SepidehM which languages she wants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a lot! i tried using themeConfig.api and several other methods, but none of them worked. this one does! 😁
package.json
Outdated
| "@docusaurus/core": "3.8.1", | ||
| "@docusaurus/preset-classic": "3.8.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can update to the latest Docusaurus version:
@docusaurus/core: 3.8.1 → 3.9.2
@docusaurus/preset-classic: 3.8.1 → 3.9.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated ✅
|
|
||
| const results = searchIndex.filter((entry) => entryMatchesQuery(entry, query)) | ||
|
|
||
| setSearchResults(results.slice(0, 10)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: consider defining a constant for the max results. For example, const MAX_RESULTS = 10.
| setSelectedIndex((prev) => | ||
| prev < searchResults.length - 1 ? prev + 1 : prev | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: setSelectedIndex((prev) => Math.min(prev + 1, searchResults.length - 1))
| ) | ||
| } else if (e.key === 'ArrowUp') { | ||
| e.preventDefault() | ||
| setSelectedIndex((prev) => (prev > 0 ? prev - 1 : 0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: setSelectedIndex((prev) => Math.max(prev - 1, 0))
| const resultsRef = useRef<HTMLDivElement>(null) | ||
|
|
||
| useEffect(() => { | ||
| const handleKeyDown = (event: KeyboardEvent) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: you can extract this into a custom hook. For example, useEscapeKey(onClose).
| direction: rtl; | ||
| } | ||
|
|
||
| .openapi-schema__name { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SepidehM raised concerns about the UI spacing. Please fix the incorrect padding/margins and consider using CSS logical properties for automatic RTL/LTR support. For example, padding-inline-start, margin-inline-start, etc. as a more global solution.
No description provided.